/// @tags:
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <vector>
#define rint register int

using std::cin;
using std::cout;

namespace BlueQuantum {

constexpr int maxn = 1e5 + 3;

int l[maxn], r[maxn];

const int LIM = 100000;

struct NODE {
  double a, b, c;

  NODE(const double &a0 = 0, const double &b0 = 0, const double &c0 = 0) : a(a0), b(b0), c(c0) {}

  NODE operator+(const NODE &t) { return NODE(a + t.a, b + t.b, c + t.c); }

  double f(double x) { return (a * x + b) * x + c; }
};

struct ITV {
  int l, r, id;

  ITV(const int &l0 = 0, const int &r0 = 0, const int &id0 = 0) : l(l0), r(r0), id(id0) {}
};

struct PARA_T {
#define ls (a << 1)
#define rs (a << 1 | 1)
#define mid ((l + r) >> 1)

  NODE tre[maxn * 4];

  void add(int a, int l, int r, int ql, int qr, NODE t) {
    if (ql <= l && r <= qr)
      tre[a] = tre[a] + t;
    else if (ql > r || qr < l)
      return;
    else
      add(ls, l, mid, ql, qr, t), add(rs, mid + 1, r, ql, qr, t);
  }

  double qur(int a, int l, int r, int p, double x) {
    if (l == r)
      return tre[a].f(x);
    else if (p <= mid)
      return tre[a].f(x) + qur(ls, l, mid, p, x);
    else
      return tre[a].f(x) + qur(rs, mid + 1, r, p, x);
  }

  void clear() { memset(tre, 0, sizeof(tre)); }

#undef ls
#undef rs
#undef mid
} T1, T2, T3;

int n;
ITV stu[maxn];
double ans[maxn];
std::vector<int> rem[maxn];

inline int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> stu[i].l >> stu[i].r;
    stu[i].id = i;
  }
  std::sort(stu + 1, stu + n + 1, [=](ITV a, ITV b) { return a.l < b.l; });
  for (int i = n; i >= 1;) {
    int j = i;
    while (stu[j].l == stu[i].l && j) j--;
    for (int t = i; t > j; t--) {
      int a = stu[t].l, b = stu[t].r, id = stu[t].id;
      ans[id] += 1.0 / (b - a) * T1.qur(1, 1, LIM, b, b) + T2.qur(1, 1, LIM, b, b);
    }
    for (int t = i; t > j; t--) {
      int a = stu[t].l, b = stu[t].r;
      T1.add(1, 1, LIM, a, b, NODE(-0.5 / (b - a), 1.0 / (b - a) * a, -0.5 / (b - a) * a * a));
      T1.add(1, 1, LIM, b + 1, LIM, NODE(0, -1, 0.5 * b + 0.5 * a));
      T2.add(1, 1, LIM, 1, LIM, NODE(0, 0, 1));
    }
    i = j;
  }
  T1.clear(), T2.clear();
  for (int i = 1; i <= n;) {
    int j = i;
    while (stu[j].l == stu[i].l && j <= n) j++;
    for (int t = i; t < j; t++) {
      int a = stu[t].l, b = stu[t].r;
      T1.add(1, 1, LIM, a, b, NODE(0, -0.5 / (b - a), 1.0 * b / (b - a)));
      T2.add(1, 1, LIM, a, b, NODE(0, -0.5 / (b - a), 0));
      T3.add(1, 1, LIM, b + 1, LIM, NODE(0.5 / (b - a), -1.0 / (b - a) * b, 0.5 / (b - a) * b * b));
      rem[b].push_back(t);
    }
    for (int t = i; t < j; t++) {
      int a = stu[t].l, b = stu[t].r, id = stu[t].id;
      ans[id] += T1.qur(1, 1, LIM, b, a) + T2.qur(1, 1, LIM, b, b) +
                 1.0 / (b - a) * T3.qur(1, 1, LIM, b, a);
    }
    for (int t = stu[i].l; t < stu[j].l; t++) {
      for (auto it : rem[t]) {
        int a = stu[it].l, b = stu[it].r;
        T1.add(1, 1, LIM, a, b, NODE(0, +0.5 / (b - a), -1.0 * b / (b - a)));
        T2.add(1, 1, LIM, a, b, NODE(0, +0.5 / (b - a), 0));
        T3.add(1, 1, LIM, b + 1, LIM,
               NODE(-0.5 / (b - a), +1.0 / (b - a) * b, -0.5 / (b - a) * b * b));
      }
    }
    i = j;
  }
  for (int i = 1; i <= n; i++) {
    cout << std::fixed << std::setprecision(7) << (ans[i] + 0.5) << '\n';
  }
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("exams.in", "r", stdin);
  freopen("exams.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
